from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic.simple import direct_to_template
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('ReportApp.views',
    url(r'^$', 'list', name='uploads'),
    url(r'^confirm/delete/$', 'confirm_delete', name='confirm_delete'),
    url(r'^delete/$', 'delete', name='delete'),
    url(r'^upload/$', 'upload', name='upload'),
    url(r'^upload/progress/$', 'upload_progress', name='upload_progress'),
    #url(r'^report/$', 'report', name='report'),
    url(r'^report/$',direct_to_template, {'template': 'Report.html'}, name='report'),
    url(r'^graph/$',direct_to_template, {'template': 'Graph.html'}, name='graph'),
)

urlpatterns += patterns('',
    (r'^account/login/$', 'django.contrib.auth.views.login'),
    (r'^account/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
    (r'^admin/(.*)', admin.site.root),
    #(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root':'./media/'}),
    (r'^agenda/', include('ReportApp.urls')),
)